package com.fujin.gulimall.gulimall.auth.Vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @title: UserRegisterVo
 * @Author uIn
 * @Date: 2022/2/25 21:34
 * @Version 1.0
 */
@Data
public class UserRegisterVo {

    @NotEmpty(message = "用户名不得为空")
    @Length(min = 8,max = 14,message = "用户名长度必须在8-14之间")
    private String userName;

    @NotEmpty(message = "密码不得为空")
    @Length(min = 8,max = 14,message = "密码长度必须在8-14之间")
    private String password;

    @NotEmpty(message = "手机号码不得为空")
    @Pattern(regexp = "^[1]([3-9])[0-9]{9}$", message = "手机号格式不正确")
    private String phone;

    @NotEmpty(message = "验证码不得为空")
    private String code;

}
